/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.uoc.tdp.pac2.client;

/**
 *
 * @author jbonet
 */
public class PntlGestionGrupos extends javax.swing.JFrame {

    /**
     * Creates new form GestionarMatriculaCurso
     */
    public PntlGestionGrupos() {
        initComponents();
        super.setLocationRelativeTo(null);
    }

    @Override
    public java.awt.Image getIconImage() {
        java.awt.Image retValue = java.awt.Toolkit.getDefaultToolkit().
                getImage(ClassLoader.getSystemResource("resources/logo.png"));     
        return retValue;
    }    
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlTablaGrupos = new javax.swing.JPanel();
        scrpnlTabla = new javax.swing.JScrollPane();
        tblGrupos = new javax.swing.JTable();
        pnlBotonera = new javax.swing.JPanel();
        btnAlta = new javax.swing.JButton();
        btnBaja = new javax.swing.JButton();
        btnCambio = new javax.swing.JButton();
        btnRecursos = new javax.swing.JButton();
        btnSalir = new javax.swing.JButton();
        pnlFiltro = new javax.swing.JPanel();
        lblFiltro = new javax.swing.JLabel();
        cmbCurso = new javax.swing.JComboBox();
        cmbTurno = new javax.swing.JComboBox();
        btnFiltrar = new javax.swing.JButton();
        lblCurso = new javax.swing.JLabel();
        lblTurno = new javax.swing.JLabel();
        lblFecIni = new javax.swing.JLabel();
        lblFecFin = new javax.swing.JLabel();
        spnFechaInicio = new javax.swing.JSpinner();
        spnFechaFin = new javax.swing.JSpinner();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Gestión de Grupos");
        setIconImage(getIconImage());
        setName("frmGestionGrupos"); // NOI18N
        getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.LINE_AXIS));

        tblGrupos.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"Estadística", "Mañana",  new Integer(30), "10/10/2012", "10/01/2013", "Fatos Xhafa", "Aula 1"},
                {"Diseño de Interficies", "Tarde",  new Integer(25), "15/09/2010", "15/01/2013", "Fatos Xhafa", "Aula 1"},
                {"Técnicas de Desarrollo del Software", "Mañana",  new Integer(10), "25/09/2012", "11/01/2013", "Fatos Xhafa", "Aula 1"},
                {null, null, null, null, null, null, null}
            },
            new String [] {
                "Curso", "Turno", "Max. Alumnos", "Fecha Inicio", "Fecha Fin", "Profesor", "Aula"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        scrpnlTabla.setViewportView(tblGrupos);
        tblGrupos.getColumnModel().getColumn(0).setPreferredWidth(200);

        pnlBotonera.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        btnAlta.setText("Alta");

        btnBaja.setText("Baja");

        btnCambio.setText("Cambio");

        btnRecursos.setText("Recursos");

        btnSalir.setText("Salir");

        org.jdesktop.layout.GroupLayout pnlBotoneraLayout = new org.jdesktop.layout.GroupLayout(pnlBotonera);
        pnlBotonera.setLayout(pnlBotoneraLayout);
        pnlBotoneraLayout.setHorizontalGroup(
            pnlBotoneraLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlBotoneraLayout.createSequentialGroup()
                .add(18, 18, 18)
                .add(btnAlta, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(btnCambio, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(btnBaja, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(10, 10, 10)
                .add(btnRecursos, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 63, Short.MAX_VALUE)
                .add(btnSalir, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(18, 18, 18))
        );
        pnlBotoneraLayout.setVerticalGroup(
            pnlBotoneraLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlBotoneraLayout.createSequentialGroup()
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(pnlBotoneraLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(btnAlta)
                    .add(btnCambio)
                    .add(btnBaja)
                    .add(btnRecursos)
                    .add(btnSalir))
                .addContainerGap())
        );

        pnlFiltro.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        lblFiltro.setBackground(new java.awt.Color(0, 255, 204));
        lblFiltro.setText("Filtro de búsqueda");
        lblFiltro.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(0, 255, 204)));
        lblFiltro.setOpaque(true);

        cmbCurso.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Estadística", "Diseño de Interfaces", "Técnicas de Desarrollo del Software" }));

        cmbTurno.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Mañana", "Tarde" }));

        btnFiltrar.setText("Filtrar");

        lblCurso.setText("Curso");

        lblTurno.setText("Turno");

        lblFecIni.setText("Fecha Inicio");

        lblFecFin.setText("Fecha Fin");

        spnFechaInicio.setModel(new javax.swing.SpinnerDateModel());

        spnFechaFin.setModel(new javax.swing.SpinnerDateModel());

        org.jdesktop.layout.GroupLayout pnlFiltroLayout = new org.jdesktop.layout.GroupLayout(pnlFiltro);
        pnlFiltro.setLayout(pnlFiltroLayout);
        pnlFiltroLayout.setHorizontalGroup(
            pnlFiltroLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(lblFiltro, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .add(pnlFiltroLayout.createSequentialGroup()
                .addContainerGap()
                .add(pnlFiltroLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(lblCurso)
                    .add(cmbCurso, 0, 1, Short.MAX_VALUE))
                .add(18, 18, 18)
                .add(pnlFiltroLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(cmbTurno, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(lblTurno))
                .add(13, 13, 13)
                .add(pnlFiltroLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(lblFecIni)
                    .add(spnFechaInicio, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 113, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(pnlFiltroLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(lblFecFin)
                    .add(pnlFiltroLayout.createSequentialGroup()
                        .add(spnFechaFin, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 113, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(18, 18, 18)
                        .add(btnFiltrar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 70, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        pnlFiltroLayout.setVerticalGroup(
            pnlFiltroLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlFiltroLayout.createSequentialGroup()
                .add(lblFiltro)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(pnlFiltroLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(lblCurso)
                    .add(lblTurno)
                    .add(lblFecIni)
                    .add(lblFecFin))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(pnlFiltroLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(cmbCurso, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(cmbTurno, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(btnFiltrar)
                    .add(spnFechaInicio, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(spnFechaFin, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        org.jdesktop.layout.GroupLayout pnlTablaGruposLayout = new org.jdesktop.layout.GroupLayout(pnlTablaGrupos);
        pnlTablaGrupos.setLayout(pnlTablaGruposLayout);
        pnlTablaGruposLayout.setHorizontalGroup(
            pnlTablaGruposLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, pnlTablaGruposLayout.createSequentialGroup()
                .addContainerGap()
                .add(pnlTablaGruposLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(pnlFiltro, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(scrpnlTabla)
                    .add(pnlBotonera, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        pnlTablaGruposLayout.setVerticalGroup(
            pnlTablaGruposLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(pnlTablaGruposLayout.createSequentialGroup()
                .addContainerGap()
                .add(scrpnlTabla, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 277, Short.MAX_VALUE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(pnlFiltro, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(pnlBotonera, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
        );

        getContentPane().add(pnlTablaGrupos);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(PntlGestionGrupos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(PntlGestionGrupos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(PntlGestionGrupos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(PntlGestionGrupos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new PntlGestionGrupos().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAlta;
    private javax.swing.JButton btnBaja;
    private javax.swing.JButton btnCambio;
    private javax.swing.JButton btnFiltrar;
    private javax.swing.JButton btnRecursos;
    private javax.swing.JButton btnSalir;
    private javax.swing.JComboBox cmbCurso;
    private javax.swing.JComboBox cmbTurno;
    private javax.swing.JLabel lblCurso;
    private javax.swing.JLabel lblFecFin;
    private javax.swing.JLabel lblFecIni;
    private javax.swing.JLabel lblFiltro;
    private javax.swing.JLabel lblTurno;
    private javax.swing.JPanel pnlBotonera;
    private javax.swing.JPanel pnlFiltro;
    private javax.swing.JPanel pnlTablaGrupos;
    private javax.swing.JScrollPane scrpnlTabla;
    private javax.swing.JSpinner spnFechaFin;
    private javax.swing.JSpinner spnFechaInicio;
    private javax.swing.JTable tblGrupos;
    // End of variables declaration//GEN-END:variables
}
